package com.springsummer.information.green.io;

import java.util.Collection;

public class NormalScanServiceTest {

    public static void main(String[] args) {
        ScanService scanService=new NormalScanService();
        Collection<String> datasOne=scanService.scan("com.springsummer.information.green.common");
        printList(datasOne);

        Collection<String> datasTwo=scanService.scanPackages("com.springsummer.information.green.common","com.springsummer.information.green.jdbc");
        printList(datasTwo);



        // scanjars BeanFactory
        Collection<String> jarNames = scanService.scan("org.springframework.beans.factory.support");
        jarNames.stream().forEach((String s) -> {
            System.out.println(s);
        });

    }

    private static void printList(Collection<String> datasOne) {
        System.out.println();
        datasOne.stream().forEach((String name)->{
            System.out.println(name);
        });
        System.out.println();

    }

}
